cmake_minimum_required(VERSION 3.13)
project(mymuduo)

set(CMAKE_CXX_STANDARD 14)



add_executable(bsa bsa.cpp)
add_executable(Tprint Tprint.cpp)
add_executable(Timestame_unittest Timestame_unittest.cpp)
add_executable(Atomic_unittest Atomic_unittest.cpp)
add_executable(Exception_test Exception_test.cpp)
add_executable(Thread_test Thread_test.cpp)
add_executable(Thread_bench Thread_bench.cpp)
add_executable(Mutex_test Mutex_test.cpp)
add_executable(BlockingQueue_bench BlockingQueue_bench.cpp)
add_executable(BlockingQueue_test BlockingQueue_test.cpp)
add_executable(ThreadPool_test ThreadPool_test.cpp)
add_executable(Singleton_test Singleton_test.cpp)
add_executable(ThreadLocal_test ThreadLocal_test.cpp)
add_executable(ThreadLocalSingleton_test ThreadLocalSingleton_test.cpp)
add_executable(TimeZone_unittest TimeZone_unittest.cpp)
add_executable(Date_unittest Date_unittest.cpp)
add_executable(Logging_test Logging_test.cpp)
add_executable(LogStream_bench LogStream_bench.cpp)
add_executable(LogFile_test LogFile_test.cpp)
add_executable(AsyncLogging_test AsyncLogging_test.cpp)

target_link_libraries(LogFile_test base)
target_link_libraries(LogStream_bench base)
target_link_libraries(Logging_test base)
target_link_libraries(Date_unittest base)
target_link_libraries(TimeZone_unittest base)
target_link_libraries(Date_unittest base)
target_link_libraries(ThreadLocal_test base)
target_link_libraries(ThreadLocalSingleton_test base)
target_link_libraries(Singleton_test base)
target_link_libraries(Timestame_unittest base)
target_link_libraries(Atomic_unittest base)
target_link_libraries(Exception_test base)
target_link_libraries(Thread_test base)
target_link_libraries(Thread_bench base)
target_link_libraries(Mutex_test base)
target_link_libraries(BlockingQueue_test base)
target_link_libraries(BlockingQueue_bench base)
target_link_libraries(ThreadPool_test base)
target_link_libraries(AsyncLogging_test base)

#if(BOOSTTEST_LIBRARY)
    add_executable(LogStream_test LogStream_test.cpp)
    target_link_libraries(LogStream_test base boost_unit_test_framework)
#endif()